home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / msk31doc.arc / MSIHAY.SCR < prev    next >
Text File  |  1991-03-26  |  3KB  |  55 lines

  1. ; FILE HAYES.SCR (stored in Kermit Distribution as MSIHAY.SCR)
  2. ;
  3. ; An MS-DOS Kermit 3.0 script program for dialing a Hayes 2400
  4. ; Smartmodem and compatibles.  Also works with ROLMphone 244PC.
  5. ; Expects variable %\1 to contain the phone number; this is done
  6. ; by the DIAL macro defined in MSKERMIT.INI.  Items marked by
  7. ; "***" might need editing.
  8. ;
  9. ; Uses ATD (modem's default dialing method) to dial the number.
  10. ; Force tone dialing by including T as first character of phone
  11. ; number, or pulse dialing by including P as first character.
  12. ;
  13. ; Author: Christine M. Gianone, January 1990, updated March 1991.
  14. ;
  15. def errstp echo Error: \%1,hang,pop
  16. set speed 2400                  ; *** Change or remove if necessary!
  17. set input timeout proceed       ; Allow IF SUCCESS, IF FAILURE
  18. set input echo off              ; Don't echo the modem test
  19. output ATQ0V1\13                ; Send AT, use word result codes.
  20. input 2 OK                      ; Modem should say "OK"
  21. if fail errstp {Turn on or connect your modem!}
  22. clear                ; Clear input buffer
  23. set count 5                     ; Set up dialing retry counter
  24. set input echo on               ; From now on, show what happens
  25. echo Dialing \%1, wait...
  26. goto dial                       ; 1st time, skip Redialing message
  27. :REDIAL
  28. echo Redialing...               ; Message for redialing.
  29. :DIAL
  30. output ATD\%1\13                ; *** Dial the number (ATDT or ATDP)
  31. set alarm 60            ; Detect keyboard interruptions.
  32. input 55 \10                    ; Wait for the linefeeds...
  33. input 5 \10            ; that surround response message.
  34. if success goto gotmsg        ; Got a message.
  35. if alarm errstp {No response from modem.} ; No response in 60 secs.
  36. hangup                ; User interrupted from keyboard,
  37. goto again            ; so try again right away
  38. :GOTMSG
  39. reinput 2 CONNECT               ; Got message, was it CONNECT?
  40. if success goto speed           ; Yes, go check the speed.
  41. reinput 2 BUSY                  ; Not CONNECT, was it BUSY?
  42. if failure errstp {No dialtone or no answer.}
  43. Echo Busy, wait...              ; Phone was busy, give message.
  44. hangup                          ; Hang up.
  45. pause 60                        ; Wait one minute.
  46. :AGAIN
  47. if count goto redial            ; Then go redial.
  48.  
  49. errstp {It never answers!  I give up.} ; Too many tries.
  50.  
  51. :SPEED                          ; Connected!
  52. echo \7                         ; Celebrate with a beep.
  53. reinput 1 1200                  ; Was message CONNECT 1200?
  54. if success set speed 1200       ; Yes, change the speed.
  55.